package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.ClasstableMapper;
import com.education.wisdom.pojo.Classtable;
import com.education.wisdom.service.IClasstableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 班级 服务层实现
 * 
 * @author ruoyi
 * @date 2019-02-20
 */
@Service
public class ClasstableServiceImpl implements IClasstableService
{
	@Autowired
	private ClasstableMapper classtableMapper;

	/**
     * 查询班级信息
     * 
     * @param id 班级ID
     * @return 班级信息
     */
    @Override
	public Classtable selectClasstableById(Integer id)
	{
	    return classtableMapper.selectClasstableById(id);
	}
	
	/**
     * 查询班级列表
     * 
     * @param classtable 班级信息
     * @return 班级集合
     */
	@Override
	public List<Classtable> selectClasstableList(Classtable classtable)
	{
	    return classtableMapper.selectClasstableList(classtable);
	}
	
    /**
     * 新增班级
     * 
     * @param classtable 班级信息
     * @return 结果
     */
	@Override
	public int insertClasstable(Classtable classtable)
	{
	    return classtableMapper.insertClasstable(classtable);
	}
	
	/**
     * 修改班级
     * 
     * @param classtable 班级信息
     * @return 结果
     */
	@Override
	public int updateClasstable(Classtable classtable)
	{
	    return classtableMapper.updateClasstable(classtable);
	}

	/**
     * 删除班级对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteClasstableByIds(String ids)
	{
		return classtableMapper.deleteClasstableByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<Classtable> selectClasstableByUserId(String userId) {
		return classtableMapper.selectClasstableByUserId(userId);
	}

	@Override
	public List<Classtable> selectClasstableListByTeacherName(String teacherName) {
		return classtableMapper.selectClasstableListByTeacherName(teacherName);
	}

	@Override
	public List<Classtable> selectClasstableListBystudentId(String studentId) {
		return classtableMapper.selectClasstableListBystudentId(studentId);
	}


}
